<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Resources\CatesResourceCollection;
use App\Models\Cates;
use Illuminate\Http\Request;

class Category extends Controller
{

    public function getCates(Request $request)
    {
        $cates = Cates::orderBy('cate_sort','desc')->get();
        $cates = new CatesResourceCollection($cates);
        return response()->json(['status'=>200,'data'=>$cates]);
    }
}
